<div ms-controller="send_pieces_search">
    <div class="location_box">
        <div class="return_title">
            <a class="return_button" ms-on-click="history"><img src="../img/icon_return.png"/></a>
            <a ms-on-click="load('home_cloud.html')">首页</a>
            <span>&gt;</span>
            <span>派件查询</span>
        </div>
        <div class="button_box">
            <a class="button_add" ms-on-click="exportExcel">导出Excel</a>
        </div>
    </div>
    <div class="clear" ms-on-keydown="pageEnter">
        <div class="button_box"><a class="button_save search_item_button" ms-on-click="page">查询</a></div>
        <div class="condition_box clear">
            <div class="condition_item">
                <label>运单号</label>
                <input type="text"  id="tracking_number" class="width_190"ms-duplex="trackingNumber" placeholder="请输入运单号"/>
            </div>
            <div class="condition_item">
                <label>派件员工号</label>
                <input type="text" class="width_190" ms-duplex="senderCode" placeholder="请输入派件员工号"/>
            </div>
            <!--<div class="condition_item">-->
                <!--<label>快递员姓名</label>-->
                <!--<input type="text" class="width_190" ms-duplex="senderName" placeholder="请输入快递员姓名"/>-->
            <!--</div>-->

            <!--<div class="condition_item">-->
                <!--<label>云仓名称</label>-->
                <!--<select>-->
                    <!--<option mx-repeat="cloud_list">{{el.name}}</option>-->
                <!--</select>-->
            <!--</div>-->


            <div class="condition_item">
                <label>开始时间</label>
                <input type="text" id="tracking_start"/>
                <input type="hidden" id="start" ms-duplex="startTime"/>
            </div>
            <div class="condition_item">
                <label>结束时间</label>
                <input type="text" id="tracking_end"/>
                <input type="hidden" id="end" ms-duplex="endTime"/>
            </div>
            <div class="condition_item">
                <label>运单状态</label>
                <select ms-duplex="status">
                    <option></option>
                    <option value="0">已入库</option>
                    <option value="1">派件中</option>
                    <option value="2">已签收</option>
                    <option value="3">已返仓</option>
                    <option value="4">已退件</option>
                    <option value="5">再次派件</option>
                </select>
            </div>
            <div class="condition_item">
                <label>代收选项</label>
                <select ms-duplex="collectStatus">
                    <option></option>
                    <option value="0">非代收单</option>
                    <option value="1">代收单</option>
                    <option value="2">代收单未收款</option>
                    <option value="3">代收单已收款</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==0||sessionStorage.companyType==1">
                <label>快递公司</label>
                <select ms-on-change="changeSrcCompany" ms-duplex="srcCompanyId">
                    <option></option>
                    <option ms-repeat="srcCompanyList" ms-attr-value="el.id">{{el.name}}</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==0||sessionStorage.companyType==1||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompany==1)">
                <label>快递站点</label>
                <select ms-duplex="srcCompanyPointId">
                    <option></option>
                    <option ms-repeat="srcCompanyPointList" ms-attr-value="el.id">{{el.name}}</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==0||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompany==1)||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompanyPoint==1)">
                <label>云仓</label>
                <select ms-on-change="changeCloud" ms-duplex="cloudId">
                    <option></option>
                    <option ms-repeat="cloudList" ms-attr-value="el.id">{{el.name}}</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==0||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompany==1)||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompanyPoint==1)||(sessionStorage.companyType==1&&sessionStorage.userPower_companyPointListCompany==1)">
                <label>云仓站点</label>
                <select ms-duplex="cloudPointId">
                    <option></option>
                    <option ms-repeat="cloudPointList" ms-attr-value="el.id">{{el.shortName}}</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==1||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompany==1)||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompanyPoint==1)">
                <label>跑腿公司</label>
                <select ms-on-change="changeSend" ms-duplex="senderCompanyId">
                    <option></option>
                    <option ms-repeat="sendList" ms-attr-value="el.id">{{el.name}}</option>
                </select>
            </div>
            <div class="condition_item" ms-if="sessionStorage.userType==4||sessionStorage.userPower_companyPointListAll==1||sessionStorage.companyType==1||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompany==1)||(sessionStorage.companyType==2&&sessionStorage.userPower_companyPointListCompanyPoint==1)||(sessionStorage.companyType==0&&sessionStorage.userPower_companyPointListCompany==1)">
                <label>跑腿站点</label>
                <select ms-duplex="senderCompanyPointId">
                    <option></option>
                    <option ms-repeat="sendPointList" ms-attr-value="el.id">{{el.shortName}}</option>
                </select>
            </div>

            <div class="condition_item">
                <span class="error_tips"></span>
            </div>
        </div>
    </div>

    <div class="table_content">
        <table ms-controller="paging">
            <thead>
            <tr>
                <td width="4%">序号</td>
                <td width="10%">运单号</td>
                <td width="10%">快递公司站点</td>
                <td width="8%">入仓司机姓名</td>

                <td width="8%" >云仓站点</td>
                <td width="8%" >入仓操作员</td>

                <td width="10%">跑腿站点</td>
                <td width="8%">派件员姓名</td>
                <td width="8%">派件员工号</td>
                <td width="6%">运单状态</td>
                <td width="8%">更新时间</td>
                <td width="6%">代收金额（元）</td>
                <td width="6%">操作</td>
            </tr>
            </thead>
            <tbody>
            <tr ms-repeat="tracking_list">
                <td >{{pageSize*(pageNum-1)+$index+1}}</td>
                <td>{{el.trackingNumber}}</td>
                <td>{{el.driverCompanyPointName}}</td>
                <td>{{el.driverName}}</td>
                <td>{{el.cloudPointName}}</td>
                <td>{{el.creatorName}}</td>
                <td>{{el.senderCompanyPointName}}</td>
                <td>{{el.senderName}}</td>
                <td>{{el.senderCode}}</td>
                <td ms-if="el.status==0">已入库</td>
                <td ms-if="el.status==1">派件中</td>
                <td ms-if="el.status==2">已签收</td>
                <td ms-if="el.status==3">已返仓</td>
                <td ms-if="el.status==4">已退件</td>
                <td ms-if="el.status==5">再次派件</td>
                <td>{{el.updateTime| date("yyyy-MM-dd HH:mm")}}</td>
                <td>{{el.collectMoney|myCurrency}}</td>
                <td>
                    <a href="#" class="blue"><img src="../img/icon_detail.png" />详情</a>
                </td>
            </tr>

            </tbody>
        </table>
    </div>
    <div ms-include-src="table_footer" class="noSelect"></div>
</div>